removed dulicated definitions in `src/utils.h`
removed unused functions for compatibilities
uses `str` instead of `bytes` if not defineed