Created classes to implement Flyweight pattern.