Changed layout of code to make it consistent with Blue.Xaml