fixed readJarFromFile, and cleaned up redundant code