Updating code, more parts of the assignment finished.
Last chunk of code needs revision