catkinize the code

I also fixed the PCL situation so that it should still compile under Groovy (but I could not test it)