SecurityService and Template service have been refactoried. Dependencies from this servicies have been updated.