Optimized validation queries prior to changes of consolidation and centralized jquery scripts in ernest.js file