Cleaned up some code, added regions to XAML