Laid out a better generator and model methods for RestfulModel