some structure change, pull in eric's manip code
moved msg to a separate pkg