Heavy refactor