updated comments, fixed bug in opts ref, added namespace opt