Fix to update arith_images call to mask usage. Clean import of modules