Added Disable Emergency Button and Code Cleanup