Small refactor, moving code around
Removed unused index.js
Added statsd support