Refactor to more modular architecture. Next step fork chrome-tabs and modularise.