1. play nicely with python2, 2. some changes to the API