Continues refactoring with jQuery