Fixed naming convention of delegate protocol, tidied up my document class.