Fixed imports for python3.
Added python variable to Makefile.
Fixed next method for python3.