Major refactor: break code into Trigger, FileBuilder, EventBuilder packages