removed unused code
fixed control panel