Fade tab color opacity
Removed unused code
Added some comments and moved some code around