Major clean up of both the code an the regex statements
Major clean up of both the code an the regex statements