Refactor + fix merge.