Added documentation
Added documentation and merged with Simeon's work