diff --git a/src/commands/getIsGenuine.js b/src/commands/getIsGenuine.js
index 8b9cfa2e..c0b66b8b 100644
--- a/src/commands/getIsGenuine.js
+++ b/src/commands/getIsGenuine.js
@@ -6,7 +6,7 @@ import { fromPromise } from 'rxjs/observable/fromPromise'
import getIsGenuine from 'helpers/devices/getIsGenuine'
import { withDevice } from 'helpers/deviceAccess'
-type Input = *
+type Input = * // FIXME !
type Result = string
const cmd: Command = createCommand('getIsGenuine', ({ devicePath, targetId }) =>
diff --git a/src/helpers/apps/installApp.js b/src/helpers/apps/installApp.js
index 2cdd04a3..1998cfb5 100644
--- a/src/helpers/apps/installApp.js
+++ b/src/helpers/apps/installApp.js
@@ -11,6 +11,6 @@ import type { LedgerScriptParams } from 'helpers/common'
export default async function installApp(
transport: Transport<*>,
{ appParams }: { appParams: LedgerScriptParams },
-): Promise {
+): Promise<*> {
return createSocketDialog(transport, '/install', appParams)
}
diff --git a/src/helpers/apps/uninstallApp.js b/src/helpers/apps/uninstallApp.js
index c9f4fc44..c67c029c 100644
--- a/src/helpers/apps/uninstallApp.js
+++ b/src/helpers/apps/uninstallApp.js
@@ -11,7 +11,7 @@ import type { LedgerScriptParams } from 'helpers/common'
export default async function uninstallApp(
transport: Transport<*>,
{ appParams }: { appParams: LedgerScriptParams },
-): Promise {
+): Promise<*> {
const params = {
...appParams,
firmware: appParams.delete,
diff --git a/src/helpers/common.js b/src/helpers/common.js
index 7d96e48b..a5a28c8c 100644
--- a/src/helpers/common.js
+++ b/src/helpers/common.js
@@ -1,24 +1,13 @@
// @flow
-import chalk from 'chalk'
-import Websocket from 'ws'
+// FIXME remove this file! 'helpers/common.js' RLY? :P
+
import qs from 'qs'
import type Transport from '@ledgerhq/hw-transport'
+import { createDeviceSocket } from './socket'
import { BASE_SOCKET_URL, APDUS, MANAGER_API_URL } from './constants'
-type WebsocketType = {
- send: (string, any) => void,
- on: (string, Function) => void,
-}
-
-type Message = {
- nonce: number,
- query?: string,
- response?: string,
- data: any,
-}
-
export type LedgerScriptParams = {
firmware?: string,
firmwareKey?: string,
@@ -35,59 +24,6 @@ export async function getMemInfos(transport: Transport<*>): Promise