Some refactorings..