Completed square, all functions complete, added comments for square