Cleaned up dialog classes code.