fix hooks and refactor lang module