Global refactoring. This code bagan to smell