Restructure some things for readability