buffer helpers added, callbacks for buffer-access added, files splitted