Clean up a bunch of valgrind errors, nix a potentially unsafe op in Buffer assignment operator.