Remove codes from switch for better readability