Fixed rendering code

Now runs at a buttery 60fps