update TODO
update to template version, so that we can compare various primitive type
fix some warnings on 64-bit platform