Added cancel button and MyApplication to give access to Context everywhere.