More refactoring and refine detail views.