final commit, minus a few minor changes