reformat sources; refactor some cimi resource testing