Refactor out config and util

Use config.something as global variable.
Use self._super() to omit the class name in super()
Add graphical history statistics

Press 's' to show statistics