Full code review

Change var names. Use as much as possible just names from the paper. Or, put a comment and say where to look in the paper to find out what this variable is supposed to be.