Making extract id definition more readable
failure & error callback are separate functions