Removed closure from scroll event function