Use new model class everywhere, and DRY up a bit

It's a shame the line count is basically neutral, but at least the code
looks cleaner now.
Change 'if !condition' to 'unless' in a few places