Nl Copy on Write

[Dont Merge Yet]

Implemented the copy on write functions for buffers

Wrote tests for all functions that were implemented

Reviewed By: @tcr