generalized html utils. started implementing messaging