Makefile fixes and structure changes