Various refactorings

added a timeout to the dojo xhr requests