Refactoring selLib