Example code on how to unnest callbacks for readability and performance improvements