integrated more HAL functions, beginning to work in heap manager