Added Comments and Improved Readability

Added comments to provide some basic documentation and aid in future
debugging.