Tidied up the Painter class