Minor refactorings gone throug