refact apps