Gmos/reduction

A large step towards reduction. 

Can you have a quick look @mhvk