Cleanups and inline documentation
DB: packaging and testing
WEB: working draft, skeleton with some JSON APIs