clean up file and add documentation