Committing some older code changes before rewrite.