Change var names to improve readability
Add some documentation