-- Cleaned up code, provided method comments.