fixed all your bugs

you had many many small bugs that were more so a product of not
reviewing your code, the bug crashing your program was caused by you
trying to set up glew before the window was set to current baisically
telling glew to set up opengl and everything without a window to work
with. Overall your code was pretty good. When coding shaders be sure to
take your time because the compiler wont be able to catch any errors in
a shade either causing a blank window or a really funky program crash.