Added documentation

Documented source code and added sphinx documentation for auto-build on read the docs.