Normalize returned array and formatted code