Some more readable var names and more thorough comments