jQuery usage bugs & HTML simplification