some refactoring (renaming), improved copy and paste algorithms, marks changed (no spaces), better verbose output