More database code cleanup
Database model cleanup continues