Moved metadata parsing into its own (optional) file. Also created a count file to aggregate alert counts.