Inspired by Backbone, but just the stuff we needed