Partial refactor