adapt add document view handling
refactor MasterViewController
cleanup