Documentation and gutting extraneous code