fix nanometer compatibility. minor code and comments cleaning (although theses files need a lot of code cleaning)