Yeah, I think I'll move all of these query-related functions to `util.py`, since they're not exactly `model` code.

These functions basically acting like a really crappy ORM, but it's a slight improvement. =P