Added Q promises to better handle async requests.