Improved code layout
Added documentation
Formatted code
Formatted comment