Cleaned and added comments.