extract Buffer dependency

part of #4