Simplified prep_bnx.pl code