fix whitespace
move graphical logic into new Canvas object