Abstract viewport and interface refactoring.