XML language loader, and moved general stuff to common class