Refactor to match the modern style