Cleaning up before making database