Implemented Multi-Database and Database API support. Closes #146