Refactored fragments in to separate files
Improved code legibility