Fill in skeleton and submit as Assignment 2

Implemented functions and added standard programming style comments.