Updated the function names and locations. A few functions need to be written, otherwise main function is ready to be written