finished adding initial support for lifted scaml. Template caching still needs to be done