some work on splitting library and UI