Refactoring: split figure class to single and composite classes