Added missing javascript code delete when cleaning up the code to use material list