Refactoring, speedup