Removed superfluous variables.
Improved documentation
Fixed state variables and how they’re populated