Adjust formatting and refactor into some partials.