fix a warning, enhance readbility, harmonize comments

- add missing header string.h for memset() (fix a warning)
- enhance code readabilityn especially for formulas
- convert C++ comment style to C comment style
- set the device name in a #define instead