Refactoring

Trying out pullrequest for mergin final version to master