Code suggestions from Mike Buckley.