Initial revision includes all tests and an interactive mode