Refactor to add $ in front of jquery variables