Modify code style

Remove space between empty braces
Add braces around one-line blocks
Add <algorithm> header for std::min to parser.cpp
Add namespace to std::copy call in help.cpp
Refactor parser internals into parser::state struct