Fix glfw link, remove unused code