Added generic type to ValueFunc. Set return type for Bits.get() to
Integer, not strictly true every time, TODO