Added refactored sections and cleaned up