various bug correction, Python 2.5 compatibility added. Still test_args fails.