Proper hooking and modification of the draw loop to save code
Merge branch 'dev'