Refactoring. No code in switch