Prog Assignment 2: Final version to submit

Created the required functions (tested locally), added general comments
of work done.