fixed a shit ton of memory leaks...more to go -_-