Reformatted all WPF code and changed some code style