Refactors all handlers