Added layer between model and database.