Ignore-marginal-whitespace flag, minor refactoring changes