Change some variable names
Add docs