Refactored code to use solution classes.
First attempt at producing dot output.