refactor note detail view controller
needs more refactor