bugfixes; more command-line options