Various fixes, makefile etc.