Cleaned up structure of classes, implemented Decorator as inner class.
Fixed an overlooked bug in topologicalSort().