Refactored, added method comments.