removing duplicated id
using sets where it makes sense;
introducing authentication aware service template;