refactoring - Painting class initialisation unified. 2 functions into 1