Reorganized code. Began to add alarms tab, and changed how the popup menu knows which tabs to work on