Added exception handling on all eventhandling functions, added new types of agents, figure it out...