Refactor, Fix error on app