Use closures for render and game Loops