Cleaned the code, added another button, simplified replace() regex, et cetera