Documentation

@Tathanen @jrit @dmaloneycalu @thoughtpalette take a look and let me know if anything looks confusing or needs more documentation
I think it would simplify the code