removing dead code and fixing multi-valued items