Fixed circular reference and enabled autocomplete, simplified templates