Simplify the code and add Python2.6 support in the same time
Fix packaging issue
Use logging for messages