Code simplified.
wip