Minor bug fixes; began adding regex_add function