WPF: Code cleanup.