Refactor: finish moving view details out of main.