added Python 3.0 support

Updated imports to try both versions of libraries. Updated one line of
division to properly cast as int in Python 3.0.
Improved error handling for controller names