added a lot of debugging code and better memeory management. still segfaulting when parsing an apache config