Refactoring based on diploma thesis