Refactoring, tempaltes corrections