Added tex chapters and appendices