Some refactoring and algorithm understanding :)