Minor refactoring, basic visualization for small problems