A little code rework