Finished assignment. Added documentation