Changed render and callback order: render, callbacks, buffer swap. Changed the waitUnitMovementNextFrames stuff back to bools