refactor viewtool to use ContentMap