Inflow ready

Inflow ready, several changes in structure