better header deps
remove unused statement
new_ptr_value is not used.
remove bad argument functions
rewrote range.