Add .gitignore
Style changes
Refactoring to use a painter object