removed SQL definitions because we're going for the db model method instead and updated with more core
Added more code