refactoring, remove ui dependnecy from library plugin. Moved related mathods to library.ui.LibraryUIUtil