Some refactoring stuff....