minor changes to have better computational performance (faster but 18 test fails)
Authored by: agarwalamit 2015-04-11
Parent: [r32636]
Child: [r32638]