- chck if document exists
- fix document check
- layout changes
- use directive for template changes