Refactoring of Christian's code; no major changes; just renaming, extracting classes, etc.; relates to #192