refact files and setting