Improve config and extract JFrame to a specific class.