Clean up code. Add comments.