Fix closing already closed connection
Added more methods to jsonwire and browser_commands