Fixes some bugs. Adds test case for Double.doubleToLongBits()