Change Ui package name and factorize preferences