added all functionality except handler re-registering
added makefile