refactored custom JS files