Refactoring to us ui package