Exit program explicitly

If no more commands are sent via the command line, the loop in
Parser stops. Instead of just jumping out of the loop, the program
should close and return an exit code. This gets implemented with
this commit.