Get some document stuff sort of working