Update and alter JS and improve functions of JS