Added build.sh + fixed socket bug