done part2
done part 3
Fix JS crash, add dependencies and code for 3 – 6
Merge branch 'part3'

* part3:
  Fix JS crash, add dependencies and code for 3 – 6
  done part 3
  done part2