Buffer overflow fixes, speedup in proxy
Minor fixes to HLS code.