Feature/switch

I added a switch for close and open panel.
I think with this changes you can close issue #111.