Adding some testing and some changes to migrate to python 3