Mostly done, two more functions to go