Fixed test, changed regex, removed unnecessary code