Move local def into let