Nutrition Plan Frontend - adjuted universal simple javascript/require.js functions logic