dstrsplit bugfixes + refactor and support raw input