some code readability improvment in free heap algorithm