Some refactors and renames.