Allowed comments and blank lines in config, and added logic to parse masks