cosmetic change: rename compound types
extract method from main (socket file preparation)
simplify message receiving loop in main
extract method from main (socket file teardown)