Fixed bugs with a white border on the right and bottom edge, and added more comments.