more optimizations
add TODO
move implementation of malloc_or_die to separate file