cleanup and fixes
don't use byte arrays when storing strings; validate strings before storing