Minor improvements (removed if-else)