Completed Assignment

Filled in functions and added comments