Implementing the version string trick

as described by a certain bearded guy.  Plus some other modernizations I couldn't resist...  It's a mess.  I'm sorry.