refactored some loops
split event parsers into own file