Beginning of WPF app and general tidy up