cleaned up sheet search/export code