Refactored schema related stuff into it's own trait