Starting to refactor switch statement.