Fixed circular references

Sessions and sockets now destroy properly