Did some regex and fixed some errors