Made the listener use the configured type field name

Hardcoding the name in it makes the type option useless.
Merge pull request #2 from stof/use_type_name

Made the listener use the configured type field name