adding square class and related redering classes and starting refactoring