improved detail view and better use of optionals