Settings: code cleanup and kylin modify