First implementation of Deferred and Promises. Ajax tests work. then implementation is not ok. Needs tests