Add stronger typing into the core logic.