Sorted current sensing, socket server bugs, cleaned & commented