removed package-require that's in core emacs
no longer using goto-line, since it's for interactive use
using (with-current-buffer ...) instead of (save-excursion (set-buffer ....))