Move db creation in a separate file, solve issue #96