Added comments and documentation
Added comments and documentation