RM: main.js unnecessary function