More documentation and cleaning