add smooth scrolling for anchors

also tweak some variable names to be more js-ish