This could probably use some more explanatory comments.