Added context menu and panel deletion. Fixed errors.