Fixed crashes from callbacks.
Fixed mouse position not being received.
 Cleanups.