Add code structure, introduce _apply methods and refresh.