Agent file can have comments and empty lines

Implements #340