returned global var to headers file
fixed building issue
tested heap functions, everything looks OK