Refactoring & moving  around
Formatted source