Refactor (rosetta stone) template parsing
This MR refactors (rosetta stone) template parsing within the service layer. Relevant code has been moved to the model class, and a findSubgraph
method has been extracted. The later one can be used in future MRs to optimize the updating process of (rosetta stone) templates.