refactor the code and add devswift for CentOS