Clean up setup function