Updated how connection works

Still some exceptions when closing connections and bugs with responses