repository cleanup

flattened src subfolder, implemented Makefile/Emakefile to build as
Erlang lib.