Added gitignore ignoring node_modules.
Cleaning up code.
Added random periodic searching to keep connection alive.