Added some docblocks, more detail to come later