Improved readability of power_stats and power_types, moved auxiliary functions into utilities