Adding more explanation, and refactored code a bit