adapted directions.js
fix merge errors
Merge branch 'master' of github.com:edricxyhuang/JEMS