clean javascript and polish scroll effect