Rewrote makefile and rearranged files.