Changes due to Browser refactor in toolkit

Changes due to Browser refactor and changes for PEP8.