Cleanup tab js code.