Making one SQL query instead of two for populating language_pages. Creating a separate function for that. Fixing a tiny bug