Move tab highlighting to core
Patch old operation code to work with tabs (incomplete)