Refactor to allow for different smoothers (the hazard penalty is probably buggy)