Further code cleanups and refactoring.
Added sphinx docs
Fledgling sphinx docs and sphinx theme etc added