fix tests; more style changes