reworked installer, mostly reordering code - but also cleaning