Change imports and made tweaks to support Python 3.