Changed things to make it python 3 compatible, and installable via pip