add cmake files, and fix some warnings.
some minor tidbits