Changed the JsonLoader to dispatch events.