Use promises from "Q" instead of jQuery