added Emergency trigger functionality,mesed the GUI and some indentation