better formatting and removes files when done