refactored front page jquery and commented