Extractor graphics is now automated. This simplifies a future refactoring.
Refactored some code.