Added documentation as suggested by code review