Added some more variables that store the map and camera before using them in the render function.
Added debug timers to see how long everything takes.