glfun: added perspective matrix, cleanup

I'd be happy to rewrite the entire graphical system I use right now, but a man's gotta do what a man's gotta do. Exams.