Removed a few unnecessary things.
Added additional comments.