add models and draft RESTful handler with templates