Additional header cleanup

Also replaces usage of stringstream with ostringstream where we only use
it for outputting data.
Define methods as const where appropriate

This makes them explicit about not modifying the current receiving
object. Also removes a few unused pieces of code that were still
lingering in here.