bug fixes, performance optimized .each() and added package.json