- moved some socket code one scope higher
- added a try catch in the translation, for sanity sakes (crashed on me)