remove Javascript files, add logic