Refactored BeforeFragment
Refactored AfterFragment