Clean up the code in setup