Fixed settings window cleanup and some regex.