Minor fixes suggested by WebStorm

Mostly jQuery selector optimizations as suggested by WebStorm and a few
dead code / unessary character removal suggestions.