Revert "Revert "Some cleanup in the jim code""
Revert "Revert "Some cleanup in the jim code""

This reverts commit fa1cbd8f0f71a5efd1d7b76089a014db112169ff.

wibbe/zum,wibbe/zum-cpp,wibbe/zum,wibbe/zum-cpp