Cleanup for Dave's code