Backend complete

Plugged all the memory leaks I could find... but if for WHATEVER reason
you are sitting around and you find one, please let me know!