Huge makefile improvement
Further makefile improvements
Logging changes