Finished coding functions, debugged, and tested.