Handle globals + nullable vs. optional
Added basic support for templates