p3 compatibility + some formatting + removing unused import

this should address Python 3 issues, fixing #18