Reorganize and rename a few methods.