Corrected two errors in bitfield logic, converting it into a class soon