Wrote functions

All functions written, just need to add comments now
Comments added as well

Comments added to file, assignment done.