Minor cleanup and missing break bug in switch statement.