Separated into a local mode and a globalized version of it, added more
autoload comments.