56 && 62: Code fix and comments

Fixed code for flipping and added comments.