Moved from index.js to server.js.
Added documentation