Set up callbacks for dynamically created buttons