clean paths and move mergeArray from YdBase to YdConfig