News: Added comments and refactored some code.