Finish most of the functionality