Citrus: Get the integration into working condition and clean up the code.