Break the viewport logic down into a handful of method calls.  Beautiful now.