cleanup and settings