delete temp files, fixed small bugs