Fully commented, following the style guide and to a 70%ish standard, need to apply to graphical (and maybe make into a class)