Made handler registry more abstract so I can use it in services