Added more to compiling
Fixed switch reference