cleanup and data type change for text layouts