ENH: cleanup code