Added event support
Rewrite paths