Code cleanup

This commit removes some unneccessary or otherwise obsolete
code that is no longer needed, as well as adding more
verbose comments to key components.