Really heavy code lifting

Code is no simpler, each part clearly separated