ENH: cleaup code