ported to python3

Basic port over from python2 into python3.

Tests passing with python 2.7. and 3.4, however it will be good to see how the travis run goes.