Cleanup and warnings