updated comments, cleaned up a little