. not source
remove old flag
use SHELL_PLATFORM
rearrange PATH and remove duplicates