fixed default unix idle function, and cleanup