Optimized shadows a bit

This is hardly ideal though
Fixed some timing issues

Frametime is not a good value for use within the think event, since the
think event is called more often than the draw event.