Clean-up. File writing is still a to-do.