more regex support, cleanups