Version 3 - Javascript edits