removed unused, added comments.