optimize some slow parts
some basic DB support for finding languages by name