More advances.

This commit makes some more advances to the lib.