replaced bin[length(bin):1] with rev(bin)

removed arguments littleEndian and signed from bin2dec. Using new attributes from binary class.