Sequelized some queries.

I've still got some more to add, so maybe hold off merging this.