Externalize database
Add database connecion test