add toplevel expander and pubsub mechanism for hooking into compilation process