Refactored names, added comments, cleaned wrap().
Made CANVAS_WIDTH and CANVAS_HEIGHT final/const.
Added more comments.