Add documentation and style a bit