Restore python 3 compatibility

Revert division to use floor division to restore python 3 compatibility.