compilation warning fixes
Makefile fixes
code cleanup
ati code cleanups