A reimplementation of some of Rails and ActiveRecord