Move some code for stable line nums