Raise a more meaningful exception if unable to locate the template file
Remove unused code
Introduce the concept of a server side session context that customizes the logic when building and querying replication graphs