make x buttons only appear when buttons are on code mirror. refactor javascript, fix bugs with joyride.