Add dialog panel and functions