messages.lua optimisations

revert listeners are two distinct tables
the layout no longer needs to register messages
messages always assume the function goes by the same name