Added documentation and small changes.