Major version 1.4, restoring Python 2.5 compatibility and adding Python 3.x compatibility for the future.

The code is now also simpler and should be more stable.