Add getDatabase method to Moa

Improved exceptions related to connecting to database
Bump composer version