Removed some mess from engine's mainloop.