Another small viewport drawing fix and some code cleanup.