Implemented toggle behavior and ui updates