Had a little clean up, added comments.