Finished main part of compact viewer.