Clean up code, added additional comments.