added key toggle button, fixed bug in frame removal