Resolved Haxe 2.11 compiler errors (changed switch syntax)