Added documentation. Fixed #4