fixed function visibility in stack, fixed free function in queue, made warnings into errors