use alignment data generator
peel binary loops
remove more duplication