Cleaned up most print issues in header and footer (fixes #22)

Still could be better but this cleans up a lot of print issues.