rename to hpp
more strtok removal and a bit of c++ificaiton