replace silly concatenates, more general cleanup