Improved modularity.  Started to create sphinx documentation for API.