Final code with documentation

Assignment 5 complete