Restructure source; move index.js to root.