Updated Makefile to handle install.
Prepared the main file to differentiate on incomming and outgoing, but did not complete it.