Updates from working version before moving into emacs.