Refactor of buffer.hpp and strided_vals.hpp