More documentation and formatting