Improve interpolation and clean up code with macros. Add exception class. Add support for event dictionary.