Rewrite of locking javascript
Bump version to 2.2.0