Clean up before implementing threading