Fixed bug. Improved documentation.