finished refactoring process regex

Still need lots of cleanup.