Renamed functions, implemented two new functions