DOC: and clean up to make code clearer