Fixed perlcritic issues
Fixed two more errors reported by scan-build
Fixes in http renderer. Make sure no metadata gets erroneously sent when a client reconnects