Add standalone server capability. Refactor.

Change-Id: I42faf77ea265b82ce44b0bd7ea01dd9fdff126a5
Merge branch 'master' of github.meetmecorp.com:pi/snowplow

Conflicts:
	main.js

Change-Id: Ia66a56cc4293d0e710d6dcb05d2d176e1f1fdbe7