More common logic has been extracted and all the methods and classes have been documented and black'd.