Refactor device class to abstract buffers