Interface simplification

Big refactoring of shared_library class