Big refactoring...
It is still works a little bit...