Adjust code structure