Cleanup whitespace and reduce jQuery calls

Change-Id: Ia3f3f6efb28639dfdaae9d460fded8fca186a208
Merge "Cleanup whitespace and reduce jQuery calls"