GMK Merge 1 - Engine code

All credit goes to Yuri Dobronravin (logicKing) for creating GMK and
releasing it under an MIT liscense.
http://www.garagegames.com/community/forums/viewthread/133892