Refactoring: extracted StatusBar and Legend as prototype objects.