Added select logic.
Tidied up around DB creation and db locations.