Issue #4. Changed name to database and refactored models