Fill some missing fields and update templates