Applied some little tweaks suggested by Matt Stevens.