Use buffer instead of tab, add surrounding and better python writing