transform jquery promise to Q promise, clean unused error handling function