Uploaded reworked Javascript