Made performance fixes, removed unnecessary document ready

Assigned many of the selectors to variables, used .filter() instead of selectors in a few places