Update zimcheck.cpp

Code cleanup. removed some unnecessary header files, added some documentation.