Async and Function Support

This update allows users to pull template locals from a function both synchronously and asynchronously.