Code improvements after CR