Clean up regex compiler w/ struct helper