refactor dir layout and add makefile