Merge pull request #45 from murrekatt/main_cleanup

Cleanup if statements.
Removed unused define.
Change to automatic variable for ZMW socket wrapper. No need for allocation on heap.
Cleanup of logging to avoid __FUNCTION__