clean some code and fix the setting.py path