Partial removal of regular expressions, simplification of logic.