Javascript models inspired by MongoMapper.