1st part of refactoring into deamon. Added Makefile and README.