fixed bug in startup method.
minor fixes to XAML structure.