fixes for refactored JS files

Post commit code review : Daniel Jao