Adding more complete sphinx documentation

API docs and all that.