Added client and torrent services definitions. Fixed some resource factory templates.