Added brief documentation, reorganised some of the methods