Numerous fixes to typedefs, inheritance, and includes in the ScalMultContEngine class.