Fixes lots of stuff with the std lib>
Attempt at making protocol wiring more sensible.