Initiated logic separation.
Some cleaning.
Fixes.
A little bit more of reordering.