some clean up and finish converting to content array