Move Lang to models and fix bugs