Cleanup: Remove trailing whitespace
Fix compiler warning (missing ínclud)
Use different method of storing strings in state file