use mode instead of opts; cleanup