Updated the compiler to use switch/case instead of if/else for more readable code