Final touches

Cleaned parts of the code, and adjusted some of the comments.