Some more refactoring in /lib.