Moving stuff over from the lib.