Add unit test for moveBuffer
Abstract away compositing into its own object