minor fixs & makefile improvements