Refactor models.
Refactor models.

- Localize code to create tables if missing
- Add helper to get db session object

maxamillion/autocloud,kushaldas/autocloud,kushaldas/autocloud,maxamillion/autocloud,maxamillion/autocloud,kushaldas/autocloud,maxamillion/autocloud,kushaldas/autocloud