started factoring out restful classes into separate template