Fixed python3 related bugs. Added six imports where necessary. Removed leftover print statement.