Javascript number sorting is weird...

Hello @x-ma, 

Please review the following commits I made in branch 'satya-secondaryIndex'.

badc9fd1c8fc92c4c01af06490edbaca4f5f64f4 (2014-08-30 00:51:31 -0700)
Javascript number sorting is weird...

R=@x-ma