Moved functions regarding parity-conditions to dedicated file.