Wroking TeX template, minor cleanup.