Change document title and clean up some codes