Code cleanup

Added handlers for SIGTERM and SIGINT
Removed defines, added enums for mDNS query-types and flags