some refactoring in ShadowForm.cs