Added more (and better) compile flags
Refactored event reader to something more sane