Simplified scheduler code