cleanup and demo tidy api