Fixed some bugs in transformer.py.  Cleaned up example.py.