Reorganized, added untested return items function