Fixed several locking issues around container.hpp and also got the unit tests working again.