added apply button, batch v. interactive mode, several other changes