Implemented shield autodetection
Refactoring of menu and globals