Added documentation and updated readme.