Allow changes to run under Python 3

In Python 3, `/` is float division, and map is non-subscriptable.