Update code to be more homogeny