diff --git a/extension/Makefile b/Makefile
similarity index 100%
rename from extension/Makefile
rename to Makefile
diff --git a/extension/background/main.ts b/background/main.ts
similarity index 100%
rename from extension/background/main.ts
rename to background/main.ts
diff --git a/extension/content_scripts/notify.js b/content_scripts/notify.js
similarity index 100%
rename from extension/content_scripts/notify.js
rename to content_scripts/notify.js
diff --git a/extension/content_scripts/notify.ts b/content_scripts/notify.ts
similarity index 100%
rename from extension/content_scripts/notify.ts
rename to content_scripts/notify.ts
diff --git a/extension/.gitignore b/extension/.gitignore
deleted file mode 100644
index 989b31165..000000000
--- a/extension/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-node_modules/
-*.js.map
-background/*.js
-lib/wallet/*.js
-lib/*.js
-!lib/module-trampoline.js
-popup/*.js
-test/tests/*.js
-build/
diff --git a/extension/gulpfile.js b/gulpfile.js
similarity index 100%
rename from extension/gulpfile.js
rename to gulpfile.js
diff --git a/extension/header.po b/header.po
similarity index 100%
rename from extension/header.po
rename to header.po
diff --git a/ide/README b/ide/README
deleted file mode 100644
index da819ea1e..000000000
--- a/ide/README
+++ /dev/null
@@ -1 +0,0 @@
-Settings and project files for IDEs and other tools should be stored here.
diff --git a/ide/codeStyle.xml b/ide/codeStyle.xml
deleted file mode 100644
index efb57f4e2..000000000
--- a/ide/codeStyle.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/extension/img/icon.png b/img/icon.png
similarity index 100%
rename from extension/img/icon.png
rename to img/icon.png
diff --git a/extension/img/logo-2015-medium.png b/img/logo-2015-medium.png
similarity index 100%
rename from extension/img/logo-2015-medium.png
rename to img/logo-2015-medium.png
diff --git a/extension/img/logo.png b/img/logo.png
similarity index 100%
rename from extension/img/logo.png
rename to img/logo.png
diff --git a/extension/img/taler-logo-24.png b/img/taler-logo-24.png
similarity index 100%
rename from extension/img/taler-logo-24.png
rename to img/taler-logo-24.png
diff --git a/extension/lib/decl/chrome/chrome.d.ts b/lib/decl/chrome/chrome.d.ts
similarity index 100%
rename from extension/lib/decl/chrome/chrome.d.ts
rename to lib/decl/chrome/chrome.d.ts
diff --git a/extension/lib/decl/filesystem/filesystem.d.ts b/lib/decl/filesystem/filesystem.d.ts
similarity index 100%
rename from extension/lib/decl/filesystem/filesystem.d.ts
rename to lib/decl/filesystem/filesystem.d.ts
diff --git a/extension/lib/decl/filewriter/filewriter.d.ts b/lib/decl/filewriter/filewriter.d.ts
similarity index 100%
rename from extension/lib/decl/filewriter/filewriter.d.ts
rename to lib/decl/filewriter/filewriter.d.ts
diff --git a/extension/lib/decl/handlebars/handlebars-1.0.0.d.ts b/lib/decl/handlebars/handlebars-1.0.0.d.ts
similarity index 100%
rename from extension/lib/decl/handlebars/handlebars-1.0.0.d.ts
rename to lib/decl/handlebars/handlebars-1.0.0.d.ts
diff --git a/extension/lib/decl/handlebars/handlebars.d.ts b/lib/decl/handlebars/handlebars.d.ts
similarity index 100%
rename from extension/lib/decl/handlebars/handlebars.d.ts
rename to lib/decl/handlebars/handlebars.d.ts
diff --git a/extension/lib/decl/jquery/jquery.d.ts b/lib/decl/jquery/jquery.d.ts
similarity index 100%
rename from extension/lib/decl/jquery/jquery.d.ts
rename to lib/decl/jquery/jquery.d.ts
diff --git a/extension/lib/decl/lib.es6.d.ts b/lib/decl/lib.es6.d.ts
similarity index 100%
rename from extension/lib/decl/lib.es6.d.ts
rename to lib/decl/lib.es6.d.ts
diff --git a/extension/lib/decl/lodash.d.ts b/lib/decl/lodash.d.ts
similarity index 100%
rename from extension/lib/decl/lodash.d.ts
rename to lib/decl/lodash.d.ts
diff --git a/extension/lib/decl/mithril.d.ts b/lib/decl/mithril.d.ts
similarity index 100%
rename from extension/lib/decl/mithril.d.ts
rename to lib/decl/mithril.d.ts
diff --git a/extension/lib/decl/node.d.ts b/lib/decl/node.d.ts
similarity index 100%
rename from extension/lib/decl/node.d.ts
rename to lib/decl/node.d.ts
diff --git a/extension/lib/decl/systemjs/systemjs.d.ts b/lib/decl/systemjs/systemjs.d.ts
similarity index 100%
rename from extension/lib/decl/systemjs/systemjs.d.ts
rename to lib/decl/systemjs/systemjs.d.ts
diff --git a/extension/lib/decl/urijs/URIjs.d.ts b/lib/decl/urijs/URIjs.d.ts
similarity index 100%
rename from extension/lib/decl/urijs/URIjs.d.ts
rename to lib/decl/urijs/URIjs.d.ts
diff --git a/extension/lib/decl/webrtc/MediaStream.d.ts b/lib/decl/webrtc/MediaStream.d.ts
similarity index 100%
rename from extension/lib/decl/webrtc/MediaStream.d.ts
rename to lib/decl/webrtc/MediaStream.d.ts
diff --git a/extension/lib/emscripten/emsc.d.ts b/lib/emscripten/emsc.d.ts
similarity index 100%
rename from extension/lib/emscripten/emsc.d.ts
rename to lib/emscripten/emsc.d.ts
diff --git a/extension/lib/emscripten/libwrapper.js b/lib/emscripten/libwrapper.js
similarity index 100%
rename from extension/lib/emscripten/libwrapper.js
rename to lib/emscripten/libwrapper.js
diff --git a/extension/lib/i18n-strings.js b/lib/i18n-strings.js
similarity index 100%
rename from extension/lib/i18n-strings.js
rename to lib/i18n-strings.js
diff --git a/extension/lib/i18n.ts b/lib/i18n.ts
similarity index 100%
rename from extension/lib/i18n.ts
rename to lib/i18n.ts
diff --git a/extension/lib/module-trampoline.js b/lib/module-trampoline.js
similarity index 100%
rename from extension/lib/module-trampoline.js
rename to lib/module-trampoline.js
diff --git a/extension/lib/refs.ts b/lib/refs.ts
similarity index 100%
rename from extension/lib/refs.ts
rename to lib/refs.ts
diff --git a/extension/lib/vendor/URI.js b/lib/vendor/URI.js
similarity index 100%
rename from extension/lib/vendor/URI.js
rename to lib/vendor/URI.js
diff --git a/extension/lib/vendor/jed.js b/lib/vendor/jed.js
similarity index 100%
rename from extension/lib/vendor/jed.js
rename to lib/vendor/jed.js
diff --git a/extension/lib/vendor/lodash.core.min.js b/lib/vendor/lodash.core.min.js
similarity index 100%
rename from extension/lib/vendor/lodash.core.min.js
rename to lib/vendor/lodash.core.min.js
diff --git a/extension/lib/vendor/mithril.js b/lib/vendor/mithril.js
similarity index 100%
rename from extension/lib/vendor/mithril.js
rename to lib/vendor/mithril.js
diff --git a/extension/lib/vendor/system-csp-production.src.js b/lib/vendor/system-csp-production.src.js
similarity index 100%
rename from extension/lib/vendor/system-csp-production.src.js
rename to lib/vendor/system-csp-production.src.js
diff --git a/extension/lib/wallet/checkable.ts b/lib/wallet/checkable.ts
similarity index 100%
rename from extension/lib/wallet/checkable.ts
rename to lib/wallet/checkable.ts
diff --git a/extension/lib/wallet/cryptoApi.ts b/lib/wallet/cryptoApi.ts
similarity index 100%
rename from extension/lib/wallet/cryptoApi.ts
rename to lib/wallet/cryptoApi.ts
diff --git a/extension/lib/wallet/cryptoLib.ts b/lib/wallet/cryptoLib.ts
similarity index 100%
rename from extension/lib/wallet/cryptoLib.ts
rename to lib/wallet/cryptoLib.ts
diff --git a/extension/lib/wallet/cryptoWorker.ts b/lib/wallet/cryptoWorker.ts
similarity index 100%
rename from extension/lib/wallet/cryptoWorker.ts
rename to lib/wallet/cryptoWorker.ts
diff --git a/extension/lib/wallet/db.ts b/lib/wallet/db.ts
similarity index 100%
rename from extension/lib/wallet/db.ts
rename to lib/wallet/db.ts
diff --git a/extension/lib/wallet/emscriptif.ts b/lib/wallet/emscriptif.ts
similarity index 100%
rename from extension/lib/wallet/emscriptif.ts
rename to lib/wallet/emscriptif.ts
diff --git a/extension/lib/wallet/helpers.ts b/lib/wallet/helpers.ts
similarity index 100%
rename from extension/lib/wallet/helpers.ts
rename to lib/wallet/helpers.ts
diff --git a/extension/lib/wallet/http.ts b/lib/wallet/http.ts
similarity index 100%
rename from extension/lib/wallet/http.ts
rename to lib/wallet/http.ts
diff --git a/extension/lib/wallet/query.ts b/lib/wallet/query.ts
similarity index 100%
rename from extension/lib/wallet/query.ts
rename to lib/wallet/query.ts
diff --git a/extension/lib/wallet/types.ts b/lib/wallet/types.ts
similarity index 100%
rename from extension/lib/wallet/types.ts
rename to lib/wallet/types.ts
diff --git a/extension/lib/wallet/wallet.ts b/lib/wallet/wallet.ts
similarity index 100%
rename from extension/lib/wallet/wallet.ts
rename to lib/wallet/wallet.ts
diff --git a/extension/lib/wallet/wxApi.ts b/lib/wallet/wxApi.ts
similarity index 100%
rename from extension/lib/wallet/wxApi.ts
rename to lib/wallet/wxApi.ts
diff --git a/extension/lib/wallet/wxMessaging.ts b/lib/wallet/wxMessaging.ts
similarity index 100%
rename from extension/lib/wallet/wxMessaging.ts
rename to lib/wallet/wxMessaging.ts
diff --git a/extension/manifest.json b/manifest.json
similarity index 100%
rename from extension/manifest.json
rename to manifest.json
diff --git a/extension/package.json b/package.json
similarity index 100%
rename from extension/package.json
rename to package.json
diff --git a/extension/pages/confirm-contract.html b/pages/confirm-contract.html
similarity index 100%
rename from extension/pages/confirm-contract.html
rename to pages/confirm-contract.html
diff --git a/extension/pages/confirm-contract.tsx b/pages/confirm-contract.tsx
similarity index 100%
rename from extension/pages/confirm-contract.tsx
rename to pages/confirm-contract.tsx
diff --git a/extension/pages/confirm-create-reserve.html b/pages/confirm-create-reserve.html
similarity index 100%
rename from extension/pages/confirm-create-reserve.html
rename to pages/confirm-create-reserve.html
diff --git a/extension/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx
similarity index 100%
rename from extension/pages/confirm-create-reserve.tsx
rename to pages/confirm-create-reserve.tsx
diff --git a/extension/pages/debug.html b/pages/debug.html
similarity index 100%
rename from extension/pages/debug.html
rename to pages/debug.html
diff --git a/extension/pages/show-db.html b/pages/show-db.html
similarity index 100%
rename from extension/pages/show-db.html
rename to pages/show-db.html
diff --git a/extension/pages/show-db.ts b/pages/show-db.ts
similarity index 100%
rename from extension/pages/show-db.ts
rename to pages/show-db.ts
diff --git a/extension/pogen/.gitignore b/pogen/.gitignore
similarity index 100%
rename from extension/pogen/.gitignore
rename to pogen/.gitignore
diff --git a/extension/pogen/example/messages.po b/pogen/example/messages.po
similarity index 100%
rename from extension/pogen/example/messages.po
rename to pogen/example/messages.po
diff --git a/extension/pogen/example/test.ts b/pogen/example/test.ts
similarity index 100%
rename from extension/pogen/example/test.ts
rename to pogen/example/test.ts
diff --git a/extension/pogen/pogen.ts b/pogen/pogen.ts
similarity index 100%
rename from extension/pogen/pogen.ts
rename to pogen/pogen.ts
diff --git a/extension/pogen/tsconfig.json b/pogen/tsconfig.json
similarity index 100%
rename from extension/pogen/tsconfig.json
rename to pogen/tsconfig.json
diff --git a/extension/popup/popup.css b/popup/popup.css
similarity index 100%
rename from extension/popup/popup.css
rename to popup/popup.css
diff --git a/extension/popup/popup.html b/popup/popup.html
similarity index 100%
rename from extension/popup/popup.html
rename to popup/popup.html
diff --git a/extension/popup/popup.tsx b/popup/popup.tsx
similarity index 100%
rename from extension/popup/popup.tsx
rename to popup/popup.tsx
diff --git a/serve-testpages b/serve-testpages
deleted file mode 100755
index b0451cd1f..000000000
--- a/serve-testpages
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-# Start a web server on port 8000 to serve test pages for the wallet extension.
-
-set +x
-
-# directory where our script resides
-mydir="$(dirname "$(readlink -f "$0")")"
-
-cd "$mydir/testpages/"
-exec python3 -m http.server 8000
diff --git a/style.txt b/style.txt
deleted file mode 100644
index d6d96cb7d..000000000
--- a/style.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-TypeScript style
-================
-
-Basics:
-- Indent with 2 spaces.
-- Keep a maximum line length of 120 characters.
-- Prefer "double quotes" for strings.
-- Never omit optional semicolons.
-- Do not put opening braces or brackets on a new line.
-- Call functions without spaces: foo(bar)
-- Use 'let' instead of 'var' whenever possible.
-- Declare "use strict;".
-- Use rocket (=>) syntax for anonymous functions. If an anonymous function is
- too long, make it a named function.
-- Use the strict equality operator (===).
-- Document functions with JSDoc comments (http://usejsdoc.org).
-
-
-JavaScript version:
-Stick to ES6 features. Do not rely on any vendor-specific extensions (such as
-Firefox often offers). ES6 features not yet supported by major browsers are
-okay as long as there is a well-supported and reasonable polyfill (such as
-babel) available.
-
-
-Names:
-- Use PascalCase for classes/types, camelCase for variables, functions and
- properties, UPPER_SNAKE_CASE for constants, kebab-case for event names.
-- Only capitalize the first letter of an acronym in identifiers (e.g. HttpResponseCode).
-
-
-APIs:
-- Prefer 'Promise' to one-shot continuations whenever possible.
-- Prefer handlebars templates to poking around in the DOM.
-
-
-Dependency Injection (DI):
-DI is a useful pattern when components need to be replaced by mocks or have
-multiple co-existing implementations. But DI also makes code overly generic,
-bureaucratic and less readble. Only use DI if there is a definite need for it,
-do not use it by default. Inject individual dependencies via class
-constructors and avoid service locators.
-
-
-Misc:
-- Do not use ES6 template strings for constructing HTML,
- use TSX/JSX literals instead.
-- For everything not covered here, stick to this style guide:
- https://github.com/airbnb/javascript.
diff --git a/extension/style/wallet.css b/style/wallet.css
similarity index 100%
rename from extension/style/wallet.css
rename to style/wallet.css
diff --git a/extension/taler-wallet-de-DE.po b/taler-wallet-de-DE.po
similarity index 100%
rename from extension/taler-wallet-de-DE.po
rename to taler-wallet-de-DE.po
diff --git a/extension/taler-wallet-en-US.po b/taler-wallet-en-US.po
similarity index 100%
rename from extension/taler-wallet-en-US.po
rename to taler-wallet-en-US.po
diff --git a/extension/taler-wallet-fr-FR.po b/taler-wallet-fr-FR.po
similarity index 100%
rename from extension/taler-wallet-fr-FR.po
rename to taler-wallet-fr-FR.po
diff --git a/extension/taler-wallet-it-IT.po b/taler-wallet-it-IT.po
similarity index 100%
rename from extension/taler-wallet-it-IT.po
rename to taler-wallet-it-IT.po
diff --git a/extension/test/run_tests.js b/test/run_tests.js
similarity index 100%
rename from extension/test/run_tests.js
rename to test/run_tests.js
diff --git a/extension/test/tests/taler.ts b/test/tests/taler.ts
similarity index 100%
rename from extension/test/tests/taler.ts
rename to test/tests/taler.ts
diff --git a/testpages/testpage_merchant.html b/testpages/testpage_merchant.html
deleted file mode 100644
index 0e9e784a0..000000000
--- a/testpages/testpage_merchant.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-Waiting for Taler wallet ...
diff --git a/extension/tsconfig.json b/tsconfig.json
similarity index 100%
rename from extension/tsconfig.json
rename to tsconfig.json