Added clipwindow and viewport functionality

Midterm complete