Some small  Refactoring