interactive mode improvements

See commits.