Added comments and replaced hGetNonBlocking