Refactoring

We need to discuss too many things! @doktor500 feel free to make any change that you wanted.