Cleanup and configuration