add rebar application to repo for easier compilation. Fixed some issues with the socket