Updated with all of Dave's changes.