Changed handler signatures

handler callbacks now take (key, value) instead of just (value)