updated router, removed some functions, new events.php