Moved to modular context.
Fixed: Lambdas and events no longer lose memory.

This is a huge commit, please report all bugs to the github bug tracker.