adds some test cases and tidys Editor code
adds index param to buffer methods and general tidying