Add trivial implementations.
Move buffer to its own file.