Set up callbacks before calling changeOptions function