Everything seems to work
A first complete version of greg.py after a refactoring into classes