Cleanup Dennis's code