Adds Templates class and use it

This removes ugly hack when Plan class was used.
Templates retrieval was broken after Roles instantiation
inside of Plan was added b/c API did not returned any roles
in data when asked for templates.

Change-Id: I484dac7c41cb90256aa1dee3eb997a4183635591