field Locking issues and defects

2614
2616
testing: moved scripts to main.js
Merge remote-tracking branch 'origin/stg-master' into Saumya
Merge remote-tracking branch 'origin/stg-master'
Merge branch 'master' of github.com:SaumyaS/HDS-origin