Updating libraries, refactoring some front end bits and fixing duplicate index key name race