remove substring dependency
use plain char* ops for scanning smaps
formatting