Finished JavaScript part