simplified logic (slight performance improvement too); removed node_modules from git