some changes for better browser js optimizations