Tightened up regexp and removed hack