Modified program implementation for more Object-Orientation.