adding polling (too simple for socket.io right now) for updates, and refactored. Fixes #5