Fixed a memory access bug and minor corrections

- fixed an illegal memory access issue in colors.cpp
- updated several issues of deprecated pointer checks
- updated several printf() issues to avoid compiler warnings
- Fixes in Makefile