Add more regex, fix some bugs.