adapt to new Sugar* architecture

We changed the architecture for integrating base languages a bit. These commits adapts the old code to the new architecture.