ignoring node_modules

Signed-off-by: Sean Nicholls <seannicholls@gmail.com>
refactored code

Signed-off-by: Sean Nicholls <seannicholls@gmail.com>