file cleanup
some documentation and test cases