Reorganize the code to follow the best practices

As per:
http://as.ynchrono.us/2007/12/filesystem-structure-of-python-project_21.html
Use Python3 by default

Minimal ports required (import and print)
Code clean up