Cleaned up gamby.py; more refactoring to be done.