Update regex. Misc cleanups. Some test code in but won't affect operations.