Compile time improvements
Removing dead code
Fixing serialize_buffer:

The serialize_buffer object goes out of scope before calling the deleter.
Reverting wrong "fix"