SW-17. unit tests for OpenLbr.
SW-17. Refactoring OpenLbr (WIP).