Added a bounding box preventing the player to move outside window.
doc comments + minor fix
minor fix