Some refactorings, more color