introduce Travis configuration
pep8 compliance
python 3 compat

Rewrite samples to be python 3 compatible.