Updated JavaScript to take into account the new object format and rendered new objects Serializable