Moved regex stuff to correct file and correct method calls.