Moved db creation into module