More refactoring work. Switch to Visitor pattern for minification.