mod: some code cleanup
add: basic map code
mod: gfx swap buffers directly in draw function