adding ace editor
* using lock mechanism to get around race condition
* adding necessary js libraries