All data is merging in one variable. Fixed writing pixel positions. Increased speed.