rearranged shell and cider buffer handling. changed to ansi-term