Added double support.

We need to review this class and clean it up. Not very good programming
practice going on here.