trying to seperate gameLoop and renderLoop, wierd
fixed bug in resizing code (missing reference, I want typed JS!!)