Some small Refactoring