improved the Paint class and made things a bit more readable