Fix potential leak in context, checked constructors to make sure all member variables are initialised. Actually fixes #23