fixing regex; cleanup "old" code