Improved Documentation

Improved some documentation to better explain code.