Started re-doing some commenting and renamed some functions (probably broken, as I might have missed some function references, will test tomorrow)