Update glhck and introduce some new functions