Added several models and database functionality