Document generator altered and Search function added