Fixed NAMES event parsing and added event factory tests