Finished Lars/Thomas's code chapter + appendix