Refactored to use UI package