Refactor handlers; get rid of unnecessary mutations.