Partially refactor handlers