Finished implementing all functions.