More refactoring, reformatting and eliminated css/javascript for showing/hiding ui elements and instead using jquery show/hide which is must faster than adding and removing classes.