Code clean up

Turned tabs back into spaces, moved regex to var statement.