mapBuffer initializations, refactor of returned values