Refactoring done

Done, the refactoring ins