Skeleton code for Assignment 2.
Added additional comments and code clean up.