Currently working on implementing id assignation in JavaScript