minor base64 corrections
working ws header gen and parser
wip ws state struct