Another serious rewrite. This one is in better shape than any