Support for labels and refs
Chapter, and more master thesis support