Added more spring magic to database classes