added doc type and various fixes