Finished the assignment, and added comments for all methods