added package.json and show files. cleaned up detection code