Refactored the implementation providing a simple eventbus as the ajax object