Created new doc object in models.
Fixed context issue in templates
Added search feature