Significant fixes to collision detection (or attempts to).
Added basic sprintf, possible keyhandler fix.