Move state handlers into their own modules
Move handlers to top-level