Some refactoring, some review