Removed unnecessary break's  in switch statements and simplified syntax.