Fixed error with finding closest point. Also fixed viewport not changing when window is resized.