Make logs optionals.

Signed-off-by: David Navarro <david.navarro@intel.com>
Remove a warning (not the most satisfying way)
Also fix some coding style.

Signed-off-by: David Navarro <david.navarro@intel.com>
Bug fix: we not always have a result callback.

Signed-off-by: David Navarro <david.navarro@intel.com>