fixed formating of make files
factoring code out into appropriate submodules