Refactor loader

Splits the large `load` method into smaller components and extracts the logic for creating `erb`, `slim` and `haml` context into one method.