Changed a few list concatenations to appends