Added comments descrbing functions / First pass at coding the functions