Refactored by lining up code lines