Rewrote makefile to add depencency generation, rearrange directory structure