re-arranged structures and updated makefile