Switch everything to $q (promises)