diff --git a/README.md b/README.md
index a3dcecf062fd8f2ed0a6d02b026a8220a9b73fc6..d6667c4c986b357d1796207069a754e5c44fab41 100644
--- a/README.md
+++ b/README.md
@@ -4,5 +4,5 @@ See [HELP.md](./companion/HELP.md) and [LICENSE](./LICENSE)
 
 # Install
 
-* Inside `PlayWallCompanion` run `npm install` to install all dependencies (on Windows: `npm.cmd install)
-* Set parent directory (the parent directory contains the `PlayWallCompanion`) as the `Developer module path`
+- Inside `PlayWallCompanion` run `npm install` to install all dependencies (on Windows: `npm.cmd install)
+- Set parent directory (the parent directory contains the `PlayWallCompanion`) as the `Developer module path`
diff --git a/actions.js b/actions.js
index acccc8cccc3b920409337fd4fc945da27213de95..8867080acc0a6fe743a10859612ac455b4d4fe89 100644
--- a/actions.js
+++ b/actions.js
@@ -1,94 +1,94 @@
 module.exports = function (self) {
-    self.setActionDefinitions({
-        pad_playback_action: {
-            name: 'Pad Playback',
-            options: [
-                {
-                    id: 'type',
-                    type: "dropdown",
-                    choices: [
-                        { id: 'NAME', label: 'Name' },
-                        { id: 'NUMBER', label: 'Number' }
-                    ],
-                    label: 'Type',
-                    default: 'NUMBER'
-                },
-                {
-                    id: 'name',
-                    type: 'textinput',
-                    label: 'Pad Name',
-                    default: '',
-                    required: true,
-                    isVisible: (options) => options.type === 'NAME'
-                },
-                {
-                    id: 'index',
-                    type: 'number',
-                    label: 'Pad Number',
-                    default: '',
-                    required: true,
-                    isVisible: (options) => options.type === 'NUMBER'
-                },
-            ],
-            callback: async (event) => {
-                if (event.options.type === 'NAME') {
-                    const pad = self.currentProject.findPadByName(event.options.name);
-                    if (!pad) {
-                        self.log('warning', 'Cannot find a pad with name ' + event.options.name);
-                        return;
-                    }
-                    self.sendToWebSocket('cart-action', {
-                        'padId': pad.id
-                    });
-                } else if (event.options.index) {
-                    self.sendToWebSocket('cart-action', {
-                        'padIndex': event.options.index - 1
-                    });
-                }
-            },
-        },
-        page_set_action: {
-            name: 'Page Set',
-            options: [
-                {
-                    id: 'page',
-                    type: 'number',
-                    label: 'Page Number',
-                    default: '',
-                },
-            ],
-            callback: async (event) => {
-                self.sendToWebSocket('page-action', {
-                    'page': event.options.page - 1
-                });
-            },
-        },
-        pad_navigate_action: {
-            name: 'Page Navigate',
-            options: [
-                {
-                    id: 'type',
-                    type: 'dropdown',
-                    choices: [
-                        { id: 'PREVIOUS', label: 'Previous' },
-                        { id: 'NEXT', label: 'Next' }
-                    ],
-                    label: 'Action',
-                    default: '',
-                },
-            ],
-            callback: async (event) => {
-                self.sendToWebSocket('navigate-action', {
-                    'action': event.options.type
-                });
-            },
-        },
-        stop_action: {
-            name: 'Stop All',
-            options: [],
-            callback: async (event) => {
-                self.sendToWebSocket('stop-action', {});
-            },
-        }
-    })
+	self.setActionDefinitions({
+		pad_playback_action: {
+			name: 'Pad Playback',
+			options: [
+				{
+					id: 'type',
+					type: 'dropdown',
+					choices: [
+						{ id: 'NAME', label: 'Name' },
+						{ id: 'NUMBER', label: 'Number' },
+					],
+					label: 'Type',
+					default: 'NUMBER',
+				},
+				{
+					id: 'name',
+					type: 'textinput',
+					label: 'Pad Name',
+					default: '',
+					required: true,
+					isVisible: (options) => options.type === 'NAME',
+				},
+				{
+					id: 'index',
+					type: 'number',
+					label: 'Pad Number',
+					default: '',
+					required: true,
+					isVisible: (options) => options.type === 'NUMBER',
+				},
+			],
+			callback: async (event) => {
+				if (event.options.type === 'NAME') {
+					const pad = self.currentProject.findPadByName(event.options.name)
+					if (!pad) {
+						self.log('warning', 'Cannot find a pad with name ' + event.options.name)
+						return
+					}
+					self.sendToWebSocket('cart-action', {
+						padId: pad.id,
+					})
+				} else if (event.options.index) {
+					self.sendToWebSocket('cart-action', {
+						padIndex: event.options.index - 1,
+					})
+				}
+			},
+		},
+		page_set_action: {
+			name: 'Page Set',
+			options: [
+				{
+					id: 'page',
+					type: 'number',
+					label: 'Page Number',
+					default: '',
+				},
+			],
+			callback: async (event) => {
+				self.sendToWebSocket('page-action', {
+					page: event.options.page - 1,
+				})
+			},
+		},
+		pad_navigate_action: {
+			name: 'Page Navigate',
+			options: [
+				{
+					id: 'type',
+					type: 'dropdown',
+					choices: [
+						{ id: 'PREVIOUS', label: 'Previous' },
+						{ id: 'NEXT', label: 'Next' },
+					],
+					label: 'Action',
+					default: '',
+				},
+			],
+			callback: async (event) => {
+				self.sendToWebSocket('navigate-action', {
+					action: event.options.type,
+				})
+			},
+		},
+		stop_action: {
+			name: 'Stop All',
+			options: [],
+			callback: async (event) => {
+				self.sendToWebSocket('stop-action', {})
+			},
+		},
+	})
 }
diff --git a/feedbacks.js b/feedbacks.js
index be4f8ee32d749e1c386e1e7acfb516f0a8df7183..582cb4a1605c5686e353c01525377a89d62c6457 100644
--- a/feedbacks.js
+++ b/feedbacks.js
@@ -1,92 +1,92 @@
-const {combineRgb} = require('@companion-module/base')
+const { combineRgb } = require('@companion-module/base')
 
 module.exports = async function (self) {
-    self.setFeedbackDefinitions({
-        pad_status: {
-            name: 'Pad Status',
-            type: 'advanced',
-            options: [
-                {
-                    id: 'type',
-                    type: "dropdown",
-                    choices: [
-                        { id: 'NAME', label: 'Name' },
-                        { id: 'NUMBER', label: 'Number' }
-                    ],
-                    label: 'Type',
-                    default: 'NUMBER'
-                },
-                {
-                    id: 'name',
-                    type: 'textinput',
-                    label: 'Pad Name',
-                    default: '',
-                    required: true,
-                    isVisible: (options) => options.type === 'NAME'
-                },
-                {
-                    id: 'index',
-                    type: 'number',
-                    label: 'Pad Number',
-                    default: '',
-                    required: true,
-                    isVisible: (options) => options.type === 'NUMBER'
-                },
-            ],
-            callback: (feedback, context) => {
-                let pad;
-                if (feedback.options.type === 'NAME') {
-                    self.log('debug', `Update feedback for pad name ${feedback.options.name}`);
-                    pad = self.currentProject.findPadByName(feedback.options.name);
-                } else {
-                    self.log('debug', `Update feedback for pad index ${feedback.options.index - 1}`);
-                    pad = self.currentProject.findPadByIndexInCurrentPage(feedback.options.index - 1);
-                }
-                if (pad != null) {
-                    self.log('debug', `Update feedback for pad id ${pad.id} with status ${pad.status}`);
-                    if (pad.status === 'PLAY') {
-                        let design = pad.design.play ?? self.currentProject.getDesign().play;
-                        return {
-                            bgcolor: hexStringToNumber(design.low),
-                            color: hexStringToNumber(design.font)
-                        };
-                    } else {
-                        let design = pad.design.normal ?? self.currentProject.getDesign().normal;
-                        return {
-                            bgcolor: hexStringToNumber(design.low),
-                            color: hexStringToNumber(design.font)
-                        };
-                    }
-                } else {
-                    return {
-                        bgcolor: combineRgb(0, 0, 0)
-                    };
-                }
-            },
-        },
-        page_active: {
-            name: 'Page Active',
-            type: 'boolean',
-            defaultStyle: {
-                color: combineRgb(255, 255, 255),
-                bgcolor: combineRgb(255, 0, 0)
-            },
-            options: [
-                {
-                    id: 'index',
-                    type: 'number',
-                    label: 'Page Number',
-                    default: '',
-                    required: true
-                },
-            ],
-            callback: (feedback, context) => {
-                return self.currentProject.getCurrentPage() === feedback.options.index - 1;
-            },
-        }
-    })
+	self.setFeedbackDefinitions({
+		pad_status: {
+			name: 'Pad Status',
+			type: 'advanced',
+			options: [
+				{
+					id: 'type',
+					type: 'dropdown',
+					choices: [
+						{ id: 'NAME', label: 'Name' },
+						{ id: 'NUMBER', label: 'Number' },
+					],
+					label: 'Type',
+					default: 'NUMBER',
+				},
+				{
+					id: 'name',
+					type: 'textinput',
+					label: 'Pad Name',
+					default: '',
+					required: true,
+					isVisible: (options) => options.type === 'NAME',
+				},
+				{
+					id: 'index',
+					type: 'number',
+					label: 'Pad Number',
+					default: '',
+					required: true,
+					isVisible: (options) => options.type === 'NUMBER',
+				},
+			],
+			callback: (feedback, context) => {
+				let pad
+				if (feedback.options.type === 'NAME') {
+					self.log('debug', `Update feedback for pad name ${feedback.options.name}`)
+					pad = self.currentProject.findPadByName(feedback.options.name)
+				} else {
+					self.log('debug', `Update feedback for pad index ${feedback.options.index - 1}`)
+					pad = self.currentProject.findPadByIndexInCurrentPage(feedback.options.index - 1)
+				}
+				if (pad != null) {
+					self.log('debug', `Update feedback for pad id ${pad.id} with status ${pad.status}`)
+					if (pad.status === 'PLAY') {
+						let design = pad.design.play ?? self.currentProject.getDesign().play
+						return {
+							bgcolor: hexStringToNumber(design.low),
+							color: hexStringToNumber(design.font),
+						}
+					} else {
+						let design = pad.design.normal ?? self.currentProject.getDesign().normal
+						return {
+							bgcolor: hexStringToNumber(design.low),
+							color: hexStringToNumber(design.font),
+						}
+					}
+				} else {
+					return {
+						bgcolor: combineRgb(0, 0, 0),
+					}
+				}
+			},
+		},
+		page_active: {
+			name: 'Page Active',
+			type: 'boolean',
+			defaultStyle: {
+				color: combineRgb(255, 255, 255),
+				bgcolor: combineRgb(255, 0, 0),
+			},
+			options: [
+				{
+					id: 'index',
+					type: 'number',
+					label: 'Page Number',
+					default: '',
+					required: true,
+				},
+			],
+			callback: (feedback, context) => {
+				return self.currentProject.getCurrentPage() === feedback.options.index - 1
+			},
+		},
+	})
 }
 
 function hexStringToNumber(string) {
-    return parseInt(string.replace(/^#/, ''), 16)
+	return parseInt(string.replace(/^#/, ''), 16)
 }
diff --git a/main.js b/main.js
index e1132e9a3de79a8252e8d6dfe962d28605f392ce..942beb9d3a540e6703b23ffa6f151c4f74783c62 100644
--- a/main.js
+++ b/main.js
@@ -1,235 +1,242 @@
-const {InstanceBase, Regex, runEntrypoint, InstanceStatus, combineRgb} = require('@companion-module/base')
+const { InstanceBase, Regex, runEntrypoint, InstanceStatus, combineRgb } = require('@companion-module/base')
 const UpgradeScripts = require('./upgrades')
 const UpdateActions = require('./actions')
 const UpdateFeedbacks = require('./feedbacks')
 const WebSocket = require('ws')
-const ProjectUpdate = require("./receive/project_update");
-const Project = require("./project");
-const PadNameUpdate = require("./receive/pad_name_update");
-const PadStatusUpdate = require("./receive/pad_status_update");
-const CurrentPageUpdate = require("./receive/current_page_update");
-const CurrentPageRequest = require("./receive/current_page_request");
-const uuid = require('uuid');
-const presets = require('./presets');
+const ProjectUpdate = require('./receive/project_update')
+const Project = require('./project')
+const PadNameUpdate = require('./receive/pad_name_update')
+const PadStatusUpdate = require('./receive/pad_status_update')
+const CurrentPageUpdate = require('./receive/current_page_update')
+const CurrentPageRequest = require('./receive/current_page_request')
+const uuid = require('uuid')
+const presets = require('./presets')
 
 class ModuleInstance extends InstanceBase {
-    isInitialized = false
-    // language=RegExp
-    wsRegex = '^wss?:\\/\\/([\\da-z.-]+)(:\\d{1,5})?(?:\\/(.*))?$'
-
-    messageHandlers = {
-        'project-current': new ProjectUpdate(),
-        'pad-name-changed': new PadNameUpdate(),
-        'pad-status-changed': new PadStatusUpdate(),
-        'current-page-changed': new CurrentPageUpdate(),
-        'current-page-request': new CurrentPageRequest()
-    };
-
-    currentProject = new Project({});
-
-    constructor(internal) {
-        super(internal)
-    }
-
-    async init(config) {
-        this.config = config
-
-        this.initWebSocket()
-        this.isInitialized = true
-
-        this.updateActions()
-        await this.updateFeedbacks()
-
-        this.setPresetDefinitions(presets());
-    }
-
-    // When module gets deleted
-    async destroy() {
-        this.isInitialized = false
-        if (this.reconnect_timer) {
-            clearTimeout(this.reconnect_timer)
-            this.reconnect_timer = null
-        }
-        if (this.ping_timer) {
-            clearTimeout(this.ping_timer)
-            this.ping_timer = null
-        }
-        if (this.ws) {
-            this.ws.close(1000)
-            delete this.ws
-        }
-    }
-
-    async configUpdated(config) {
-        this.config = config
-        this.initWebSocket()
-    }
-
-    // Return config fields for web config
-    getConfigFields() {
-        return [
-            {
-                type: 'textinput',
-                id: 'host',
-                label: 'PlayWall IP',
-                default: '127.0.0.1',
-                width: 8,
-                regex: Regex.IP,
-            },
-            {
-                type: 'textinput',
-                id: 'port',
-                label: 'PlayWall Port',
-                default: '9876',
-                width: 4,
-                regex: Regex.PORT,
-            },
-            {
-                type: 'checkbox',
-                id: 'debug_messages',
-                label: 'Debug messages',
-                tooltip: 'Log incomming and outcomming messages',
-                width: 6,
-            },
-            {
-                type: 'checkbox',
-                id: 'reconnect',
-                label: 'Reconnect',
-                tooltip: 'Reconnect on WebSocket error (after 5 secs)',
-                width: 6,
-                default: true,
-            },
-        ]
-    }
-
-    updateActions() {
-        UpdateActions(this)
-    }
-
-    async updateFeedbacks() {
-        await UpdateFeedbacks(this)
-    }
-
-    // Websocket handling
-
-    maybeReconnect() {
-        if (this.isInitialized && this.config.reconnect) {
-            if (this.reconnect_timer) {
-                clearTimeout(this.reconnect_timer)
-            }
-            this.reconnect_timer = setTimeout(() => {
-                this.initWebSocket()
-            }, 1000)
-        }
-    }
-
-    startPingTrigger() {
-        if (this.isInitialized) {
-            if (this.ping_timer) {
-                clearTimeout(this.ping_timer)
-            }
-            this.log('debug', "Start Ping Timer");
-            this.ping_timer = setInterval(() => {
-                this.sendToWebSocket('ping', {});
-            }, 60 * 1000)
-        }
-    }
-
-    initWebSocket() {
-        if (this.reconnect_timer) {
-            clearTimeout(this.reconnect_timer)
-            this.reconnect_timer = null
-        }
-        if (this.ping_timer) {
-            clearTimeout(this.ping_timer)
-            this.ping_timer = null
-        }
-
-        if (this.config.host == null || this.config.port == null) {
-            this.log('debug', `PlayWall host '${this.config.host}' or port '${this.config.port}' is invalid`);
-            this.updateStatus(InstanceStatus.BadConfig, `PlayWall host '${this.config.host}' or port '${this.config.port}' is invalid`)
-            return
-        }
-        const url = `ws://${this.config.host}:${this.config.port}/api`
-        if (!url || url.match(new RegExp(this.wsRegex)) === null) {
-            this.updateStatus(InstanceStatus.BadConfig, `WS URL is not defined or invalid`)
-            return
-        }
-
-        this.updateStatus(InstanceStatus.Connecting)
-
-        if (this.ws) {
-            this.ws.close(1000)
-            delete this.ws
-        }
-
-        this.ws = new WebSocket(url)
-
-        this.ws.on('open', () => {
-            this.updateStatus(InstanceStatus.Ok)
-            this.log('debug', `Connection opened`)
-            this.startPingTrigger();
-
-            this.sendToWebSocket('project-current', {});
-        })
-        this.ws.on('close', (code) => {
-            this.log('debug', `Connection closed with code ${code}`)
-            this.updateStatus(InstanceStatus.Disconnected, `Connection closed with code ${code}`)
-            this.maybeReconnect();
-        })
-
-        this.ws.on('message', this.messageReceivedFromWebSocket.bind(this))
-
-        this.ws.on('error', (data) => {
-            this.log('error', `WebSocket error: ${data}`)
-        })
-    }
-
-    sendToWebSocket(type, payload) {
-        this.ws.send(JSON.stringify({
-            'type': type,
-            'messageId': uuid.v4(),
-            'payload': payload
-        }));
-    }
-
-    messageReceivedFromWebSocket(data) {
-        if (this.config.debug_messages) {
-            this.log('debug', `Message received: ${data}`)
-        }
-
-        const message = JSON.parse(data)
-        if (message.type != null) {
-            if (this.messageHandlers[message.type] != null) {
-                this.messageHandlers[message.type].handleMessage(this, message)
-            } else {
-                this.log('debug', `Cannot handle incoming message of type ${message.type}`)
-            }
-        } else if (message.updateType != null) {
-            if (this.messageHandlers[message.updateType] != null) {
-                this.messageHandlers[message.updateType].handleMessage(this, message)
-            } else {
-                this.log('debug', `Cannot handle incoming message of updateType ${message.updateType}`)
-            }
-        } else {
-            this.log('debug', `Cannot handle incoming message ${data}`)
-        }
-    }
-
-    updateVariables() {
-        this.setVariableDefinitions([...Array(this.currentProject.getPadCount()).keys()].map(index => {
-            return {variableId: `pad-${index}`, name: `Pad Index ${index + 1}`}
-        }))
-    }
-
-    updateVariablesForCurrentPage() {
-        let pads = this.currentProject.getAllPadsOfCurrentPage();
-        for (let i in pads) {
-            let pad = pads[i];
-            this.log('debug', `Update variable 'pad-${pad.position}'`);
-            this.setVariableValues({[`pad-${pad.position}`]: pad.name});
-        }
-    }
+	isInitialized = false
+	// language=RegExp
+	wsRegex = '^wss?:\\/\\/([\\da-z.-]+)(:\\d{1,5})?(?:\\/(.*))?$'
+
+	messageHandlers = {
+		'project-current': new ProjectUpdate(),
+		'pad-name-changed': new PadNameUpdate(),
+		'pad-status-changed': new PadStatusUpdate(),
+		'current-page-changed': new CurrentPageUpdate(),
+		'current-page-request': new CurrentPageRequest(),
+	}
+
+	currentProject = new Project({})
+
+	constructor(internal) {
+		super(internal)
+	}
+
+	async init(config) {
+		this.config = config
+
+		this.initWebSocket()
+		this.isInitialized = true
+
+		this.updateActions()
+		await this.updateFeedbacks()
+
+		this.setPresetDefinitions(presets())
+	}
+
+	// When module gets deleted
+	async destroy() {
+		this.isInitialized = false
+		if (this.reconnect_timer) {
+			clearTimeout(this.reconnect_timer)
+			this.reconnect_timer = null
+		}
+		if (this.ping_timer) {
+			clearTimeout(this.ping_timer)
+			this.ping_timer = null
+		}
+		if (this.ws) {
+			this.ws.close(1000)
+			delete this.ws
+		}
+	}
+
+	async configUpdated(config) {
+		this.config = config
+		this.initWebSocket()
+	}
+
+	// Return config fields for web config
+	getConfigFields() {
+		return [
+			{
+				type: 'textinput',
+				id: 'host',
+				label: 'PlayWall IP',
+				default: '127.0.0.1',
+				width: 8,
+				regex: Regex.IP,
+			},
+			{
+				type: 'textinput',
+				id: 'port',
+				label: 'PlayWall Port',
+				default: '9876',
+				width: 4,
+				regex: Regex.PORT,
+			},
+			{
+				type: 'checkbox',
+				id: 'debug_messages',
+				label: 'Debug messages',
+				tooltip: 'Log incomming and outcomming messages',
+				width: 6,
+			},
+			{
+				type: 'checkbox',
+				id: 'reconnect',
+				label: 'Reconnect',
+				tooltip: 'Reconnect on WebSocket error (after 5 secs)',
+				width: 6,
+				default: true,
+			},
+		]
+	}
+
+	updateActions() {
+		UpdateActions(this)
+	}
+
+	async updateFeedbacks() {
+		await UpdateFeedbacks(this)
+	}
+
+	// Websocket handling
+
+	maybeReconnect() {
+		if (this.isInitialized && this.config.reconnect) {
+			if (this.reconnect_timer) {
+				clearTimeout(this.reconnect_timer)
+			}
+			this.reconnect_timer = setTimeout(() => {
+				this.initWebSocket()
+			}, 1000)
+		}
+	}
+
+	startPingTrigger() {
+		if (this.isInitialized) {
+			if (this.ping_timer) {
+				clearTimeout(this.ping_timer)
+			}
+			this.log('debug', 'Start Ping Timer')
+			this.ping_timer = setInterval(() => {
+				this.sendToWebSocket('ping', {})
+			}, 60 * 1000)
+		}
+	}
+
+	initWebSocket() {
+		if (this.reconnect_timer) {
+			clearTimeout(this.reconnect_timer)
+			this.reconnect_timer = null
+		}
+		if (this.ping_timer) {
+			clearTimeout(this.ping_timer)
+			this.ping_timer = null
+		}
+
+		if (this.config.host == null || this.config.port == null) {
+			this.log('debug', `PlayWall host '${this.config.host}' or port '${this.config.port}' is invalid`)
+			this.updateStatus(
+				InstanceStatus.BadConfig,
+				`PlayWall host '${this.config.host}' or port '${this.config.port}' is invalid`
+			)
+			return
+		}
+		const url = `ws://${this.config.host}:${this.config.port}/api`
+		if (!url || url.match(new RegExp(this.wsRegex)) === null) {
+			this.updateStatus(InstanceStatus.BadConfig, `WS URL is not defined or invalid`)
+			return
+		}
+
+		this.updateStatus(InstanceStatus.Connecting)
+
+		if (this.ws) {
+			this.ws.close(1000)
+			delete this.ws
+		}
+
+		this.ws = new WebSocket(url)
+
+		this.ws.on('open', () => {
+			this.updateStatus(InstanceStatus.Ok)
+			this.log('debug', `Connection opened`)
+			this.startPingTrigger()
+
+			this.sendToWebSocket('project-current', {})
+		})
+		this.ws.on('close', (code) => {
+			this.log('debug', `Connection closed with code ${code}`)
+			this.updateStatus(InstanceStatus.Disconnected, `Connection closed with code ${code}`)
+			this.maybeReconnect()
+		})
+
+		this.ws.on('message', this.messageReceivedFromWebSocket.bind(this))
+
+		this.ws.on('error', (data) => {
+			this.log('error', `WebSocket error: ${data}`)
+		})
+	}
+
+	sendToWebSocket(type, payload) {
+		this.ws.send(
+			JSON.stringify({
+				type: type,
+				messageId: uuid.v4(),
+				payload: payload,
+			})
+		)
+	}
+
+	messageReceivedFromWebSocket(data) {
+		if (this.config.debug_messages) {
+			this.log('debug', `Message received: ${data}`)
+		}
+
+		const message = JSON.parse(data)
+		if (message.type != null) {
+			if (this.messageHandlers[message.type] != null) {
+				this.messageHandlers[message.type].handleMessage(this, message)
+			} else {
+				this.log('debug', `Cannot handle incoming message of type ${message.type}`)
+			}
+		} else if (message.updateType != null) {
+			if (this.messageHandlers[message.updateType] != null) {
+				this.messageHandlers[message.updateType].handleMessage(this, message)
+			} else {
+				this.log('debug', `Cannot handle incoming message of updateType ${message.updateType}`)
+			}
+		} else {
+			this.log('debug', `Cannot handle incoming message ${data}`)
+		}
+	}
+
+	updateVariables() {
+		this.setVariableDefinitions(
+			[...Array(this.currentProject.getPadCount()).keys()].map((index) => {
+				return { variableId: `pad-${index}`, name: `Pad Index ${index + 1}` }
+			})
+		)
+	}
+
+	updateVariablesForCurrentPage() {
+		let pads = this.currentProject.getAllPadsOfCurrentPage()
+		for (let i in pads) {
+			let pad = pads[i]
+			this.log('debug', `Update variable 'pad-${pad.position}'`)
+			this.setVariableValues({ [`pad-${pad.position}`]: pad.name })
+		}
+	}
 }
 
 runEntrypoint(ModuleInstance, UpgradeScripts)
diff --git a/presets.js b/presets.js
index 7298ea00360ff245e1b12194b91e7a69d4839b67..81b7711b97f6b57b717462ef96c6b1dee51cc4bc 100644
--- a/presets.js
+++ b/presets.js
@@ -1,136 +1,135 @@
-const {combineRgb} = require("@companion-module/base");
+const { combineRgb } = require('@companion-module/base')
 module.exports = function () {
-    let presets = {};
+	let presets = {}
 
-    // Pad Playback
-    for (let i = 0; i < 100; i++) {
-        presets[`pad-playback-${i}`] = {
-            category: 'Pad Playback',
-            name: `pad-playback-${i}`,
-            type: 'button',
-            previewStyle: {
-                text: `Pad ${i + 1}`,
-                size: '18',
-                color: combineRgb(255, 255, 255),
-                bgcolor: combineRgb(0, 0, 0),
-            },
-            style: {
-                text: `$(PlayWall:pad-${i})`,
-                size: '18',
-                color: combineRgb(255, 255, 255),
-                bgcolor: combineRgb(0, 0, 0),
-            },
-            steps: [
-                {
-                    down: [
-                        {
-                            actionId: 'pad_playback_action',
-                            options: {
-                                'type': 'NUMBER',
-                                'index': i + 1
-                            }
-                        }
-                    ]
-                }
-            ],
-            feedbacks: [
-                {
-                    feedbackId: 'pad_status',
-                    options: {
-                        'type': 'NUMBER',
-                        'index': i + 1
-                    }
-                }
-            ]
-        };
-    }
+	// Pad Playback
+	for (let i = 0; i < 100; i++) {
+		presets[`pad-playback-${i}`] = {
+			category: 'Pad Playback',
+			name: `pad-playback-${i}`,
+			type: 'button',
+			previewStyle: {
+				text: `Pad ${i + 1}`,
+				size: '18',
+				color: combineRgb(255, 255, 255),
+				bgcolor: combineRgb(0, 0, 0),
+			},
+			style: {
+				text: `$(PlayWall:pad-${i})`,
+				size: '18',
+				color: combineRgb(255, 255, 255),
+				bgcolor: combineRgb(0, 0, 0),
+			},
+			steps: [
+				{
+					down: [
+						{
+							actionId: 'pad_playback_action',
+							options: {
+								type: 'NUMBER',
+								index: i + 1,
+							},
+						},
+					],
+				},
+			],
+			feedbacks: [
+				{
+					feedbackId: 'pad_status',
+					options: {
+						type: 'NUMBER',
+						index: i + 1,
+					},
+				},
+			],
+		}
+	}
 
-    // Pages
-    for (let i = 0; i < 20; i++) {
-        presets[`page-set-${i}`] = {
-            category: 'Pad Set',
-            name: `page-set-${i}`,
-            type: 'button',
-            style: {
-                text: `Seite ${i + 1}`,
-                size: '18',
-                color: combineRgb(255, 255, 255),
-                bgcolor: combineRgb(0, 0, 0),
-            },
-            steps: [
-                {
-                    down: [
-                        {
-                            actionId: 'page_set_action',
-                            options: {
-                                'page': i + 1
-                            }
-                        }
-                    ]
-                }
-            ],
-            feedbacks: [
-                {
-                    feedbackId: 'page_active',
-                    options: {
-                        'index': i + 1
-                    },
-                    style: {
-                        bgcolor: combineRgb(255, 0, 0),
-                        color: combineRgb(255, 255, 255),
-                    }
-                }
-            ]
-        };
-    }
+	// Pages
+	for (let i = 0; i < 20; i++) {
+		presets[`page-set-${i}`] = {
+			category: 'Pad Set',
+			name: `page-set-${i}`,
+			type: 'button',
+			style: {
+				text: `Seite ${i + 1}`,
+				size: '18',
+				color: combineRgb(255, 255, 255),
+				bgcolor: combineRgb(0, 0, 0),
+			},
+			steps: [
+				{
+					down: [
+						{
+							actionId: 'page_set_action',
+							options: {
+								page: i + 1,
+							},
+						},
+					],
+				},
+			],
+			feedbacks: [
+				{
+					feedbackId: 'page_active',
+					options: {
+						index: i + 1,
+					},
+					style: {
+						bgcolor: combineRgb(255, 0, 0),
+						color: combineRgb(255, 255, 255),
+					},
+				},
+			],
+		}
+	}
 
-    presets['pad-navigate-previous'] = {
-        category: 'Page Navigate',
-        name: 'pad-navigate-previous',
-        type: 'button',
-        style: {
-            text: 'Zurück',
-            size: '18',
-            color: combineRgb(255, 255, 255),
-            bgcolor: combineRgb(0, 0, 0),
-        },
-        steps: [
-            {
-                down: [
-                    {
-                        actionId: 'pad_navigate_action',
-                        options: {
-                            'type': 'PREVIOUS'
-                        }
-                    }
-                ]
-            }
-        ]
-    };
-    presets['pad-navigate-next'] = {
-        category: 'Page Navigate',
-        name: 'pad-navigate-next',
-        type: 'button',
-        style: {
-            text: 'Vor',
-            size: '18',
-            color: combineRgb(255, 255, 255),
-            bgcolor: combineRgb(0, 0, 0),
-        },
-        steps: [
-            {
-                down: [
-                    {
-                        actionId: 'pad_navigate_action',
-                        options: {
-                            'type': 'NEXT'
-                        }
-                    }
-                ]
-            }
-        ]
-    }
+	presets['pad-navigate-previous'] = {
+		category: 'Page Navigate',
+		name: 'pad-navigate-previous',
+		type: 'button',
+		style: {
+			text: 'Zurück',
+			size: '18',
+			color: combineRgb(255, 255, 255),
+			bgcolor: combineRgb(0, 0, 0),
+		},
+		steps: [
+			{
+				down: [
+					{
+						actionId: 'pad_navigate_action',
+						options: {
+							type: 'PREVIOUS',
+						},
+					},
+				],
+			},
+		],
+	}
+	presets['pad-navigate-next'] = {
+		category: 'Page Navigate',
+		name: 'pad-navigate-next',
+		type: 'button',
+		style: {
+			text: 'Vor',
+			size: '18',
+			color: combineRgb(255, 255, 255),
+			bgcolor: combineRgb(0, 0, 0),
+		},
+		steps: [
+			{
+				down: [
+					{
+						actionId: 'pad_navigate_action',
+						options: {
+							type: 'NEXT',
+						},
+					},
+				],
+			},
+		],
+	}
 
-
-    return presets;
-};
\ No newline at end of file
+	return presets
+}
diff --git a/project.js b/project.js
index bb3e2d7519e12b13d1c27ac7fed36b62f92c3162..bf2b74d2bc1fcc07508035adf1090cb4e350bcf4 100644
--- a/project.js
+++ b/project.js
@@ -1,145 +1,145 @@
 module.exports = class Project {
-    constructor(data) {
-        this.padCache = {}
-        this.currentPage = 0;
+	constructor(data) {
+		this.padCache = {}
+		this.currentPage = 0
 
-        // Prefill with current project
-        if (data) {
-            this.data = data;
-            console.log('Create pad cache')
-            for (const pageId in data.pages) {
-                const page = data.pages[pageId]
-                for (const padId in page.pads) {
-                    const pad = page.pads[padId];
-                    if (pad.name !== "") {
-                        this.padCache[pad.name] = pad;
-                        console.log(`Add pad "${pad.name}" to cache`)
-                    }
-                }
-            }
-        }
-    }
+		// Prefill with current project
+		if (data) {
+			this.data = data
+			console.log('Create pad cache')
+			for (const pageId in data.pages) {
+				const page = data.pages[pageId]
+				for (const padId in page.pads) {
+					const pad = page.pads[padId]
+					if (pad.name !== '') {
+						this.padCache[pad.name] = pad
+						console.log(`Add pad "${pad.name}" to cache`)
+					}
+				}
+			}
+		}
+	}
 
-    /*
+	/*
     Page
      */
 
-    /**
-     *
-     * @returns {number}
-     */
-    getCurrentPage() {
-        return this.currentPage;
-    }
+	/**
+	 *
+	 * @returns {number}
+	 */
+	getCurrentPage() {
+		return this.currentPage
+	}
 
-    /**
-     *
-     * @param {number} newPage
-     */
-    updateCurrentPage(newPage) {
-        this.currentPage = newPage;
-    }
+	/**
+	 *
+	 * @param {number} newPage
+	 */
+	updateCurrentPage(newPage) {
+		this.currentPage = newPage
+	}
 
-    /*
+	/*
     Pads
      */
 
-    /**
-     *
-     * @returns {number}
-     */
-    getPadCount() {
-        return this.data.settings.columns * this.data.settings.rows;
-    }
+	/**
+	 *
+	 * @returns {number}
+	 */
+	getPadCount() {
+		return this.data.settings.columns * this.data.settings.rows
+	}
 
-    /**
-     *
-     * @returns {*[]}
-     */
-    getAllPadsOfCurrentPage() {
-        let pads = [];
+	/**
+	 *
+	 * @returns {*[]}
+	 */
+	getAllPadsOfCurrentPage() {
+		let pads = []
 
-        for (const pageId in this.data.pages) {
-            const page = this.data.pages[pageId]
-            if (page.position === this.currentPage) {
-                for (const padId in page.pads) {
-                    const pad = page.pads[padId];
-                    pads.push(pad);
-                }
-            }
-        }
-        return pads;
-    }
+		for (const pageId in this.data.pages) {
+			const page = this.data.pages[pageId]
+			if (page.position === this.currentPage) {
+				for (const padId in page.pads) {
+					const pad = page.pads[padId]
+					pads.push(pad)
+				}
+			}
+		}
+		return pads
+	}
 
-    /**
-     *
-     * @param {string} oldName
-     * @param {string} newName
-     */
-    updatePadName(oldName, newName) {
-        this.padCache[newName] = this.padCache[oldName];
-        delete this.padCache[oldName];
-    }
+	/**
+	 *
+	 * @param {string} oldName
+	 * @param {string} newName
+	 */
+	updatePadName(oldName, newName) {
+		this.padCache[newName] = this.padCache[oldName]
+		delete this.padCache[oldName]
+	}
 
-    /**
-     *
-     * @param {string} padId
-     * @param {string} newStatus
-     */
-    updatePadStatus(padId, newStatus) {
-        const pad = this.findPadById(padId);
-        if (pad != null) {
-            pad.status = newStatus;
-        }
-    }
+	/**
+	 *
+	 * @param {string} padId
+	 * @param {string} newStatus
+	 */
+	updatePadStatus(padId, newStatus) {
+		const pad = this.findPadById(padId)
+		if (pad != null) {
+			pad.status = newStatus
+		}
+	}
 
-    /**
-     *
-     * @param {string} name
-     * @returns {*}
-     */
-    findPadByName(name) {
-        return this.padCache[name];
-    }
+	/**
+	 *
+	 * @param {string} name
+	 * @returns {*}
+	 */
+	findPadByName(name) {
+		return this.padCache[name]
+	}
 
-    /**
-     *
-     * @param {number} index
-     */
-    findPadByIndexInCurrentPage(index) {
-        for (const pageId in this.data.pages) {
-            const page = this.data.pages[pageId]
-            if (page.position === this.currentPage) {
-                for (const padId in page.pads) {
-                    const pad = page.pads[padId];
-                    if (pad.position === index) {
-                        return pad;
-                    }
-                }
-            }
-        }
-        return null;
-    }
+	/**
+	 *
+	 * @param {number} index
+	 */
+	findPadByIndexInCurrentPage(index) {
+		for (const pageId in this.data.pages) {
+			const page = this.data.pages[pageId]
+			if (page.position === this.currentPage) {
+				for (const padId in page.pads) {
+					const pad = page.pads[padId]
+					if (pad.position === index) {
+						return pad
+					}
+				}
+			}
+		}
+		return null
+	}
 
-    /**
-     *
-     * @param {string} padId
-     */
-    findPadById(padId) {
-        for (const id in this.padCache) {
-            const pad = this.padCache[id];
-            if (pad.id === padId) {
-                return pad
-            }
-        }
-        return null
-    }
+	/**
+	 *
+	 * @param {string} padId
+	 */
+	findPadById(padId) {
+		for (const id in this.padCache) {
+			const pad = this.padCache[id]
+			if (pad.id === padId) {
+				return pad
+			}
+		}
+		return null
+	}
 
-    /*
+	/*
     Design
      */
 
-    getDesign() {
-        return this.data.design;
-    }
-}
\ No newline at end of file
+	getDesign() {
+		return this.data.design
+	}
+}
diff --git a/receive/current_page_request.js b/receive/current_page_request.js
index e8a3a5887c22f1a96174e6e93a5de8803c27830c..9cbeb9f677d7c00c92b6c55c5e8843c70cc97333 100644
--- a/receive/current_page_request.js
+++ b/receive/current_page_request.js
@@ -1,11 +1,10 @@
-const MessageExecutable = require("./message_executable");
+const MessageExecutable = require('./message_executable')
 
 module.exports = class CurrentPageRequest extends MessageExecutable {
+	handleMessage(plugin, message) {
+		plugin.currentProject.updateCurrentPage(message.page)
+		plugin.checkFeedbacks()
 
-    handleMessage(plugin, message) {
-        plugin.currentProject.updateCurrentPage(message.page);
-        plugin.checkFeedbacks();
-
-        plugin.updateVariablesForCurrentPage();
-    }
-}
\ No newline at end of file
+		plugin.updateVariablesForCurrentPage()
+	}
+}
diff --git a/receive/current_page_update.js b/receive/current_page_update.js
index abcfe4219cc643f4fb56d15ee9b754004c74bafa..34d849bfb9c0989a456e6e22407579b3526eb8cf 100644
--- a/receive/current_page_update.js
+++ b/receive/current_page_update.js
@@ -1,11 +1,10 @@
-const MessageExecutable = require("./message_executable");
+const MessageExecutable = require('./message_executable')
 
 module.exports = class CurrentPageUpdate extends MessageExecutable {
+	handleMessage(plugin, message) {
+		plugin.currentProject.updateCurrentPage(message.newPage)
+		plugin.checkFeedbacks()
 
-    handleMessage(plugin, message) {
-        plugin.currentProject.updateCurrentPage(message.newPage);
-        plugin.checkFeedbacks();
-
-        plugin.updateVariablesForCurrentPage();
-    }
-}
\ No newline at end of file
+		plugin.updateVariablesForCurrentPage()
+	}
+}
diff --git a/receive/message_executable.js b/receive/message_executable.js
index 5d0039fec3131ed7f3a94954de21b5f5ae17efc7..f3fef19de9a80c87593de62f65019b300225819f 100644
--- a/receive/message_executable.js
+++ b/receive/message_executable.js
@@ -1,10 +1,10 @@
 module.exports = class MessageExecutable {
-    /**
-     *
-     * @param {ModuleInstance} plugin
-     * @param {Object} message
-     */
-    handleMessage(plugin, message) {
-      // Abstract method
-    }
-}
\ No newline at end of file
+	/**
+	 *
+	 * @param {ModuleInstance} plugin
+	 * @param {Object} message
+	 */
+	handleMessage(plugin, message) {
+		// Abstract method
+	}
+}
diff --git a/receive/pad_name_update.js b/receive/pad_name_update.js
index 91f5f0f908f0b6b296ada8b6e269aa09808c3826..658f90fc30c2eba27b429ffa5e6574c5f2bc9a10 100644
--- a/receive/pad_name_update.js
+++ b/receive/pad_name_update.js
@@ -1,14 +1,13 @@
-const MessageExecutable = require("./message_executable");
+const MessageExecutable = require('./message_executable')
 
 module.exports = class PadNameUpdate extends MessageExecutable {
+	handleMessage(plugin, message) {
+		plugin.currentProject.updatePadName(message.oldValue, message.newValue)
 
-    handleMessage(plugin, message) {
-        plugin.currentProject.updatePadName(message.oldValue, message.newValue);
-
-        let pad = plugin.currentProject.findPadById(message.pad);
-        if (pad.page === plugin.currentProject.getCurrentPage()) {
-            plugin.log('debug', `Update variable 'pad-${pad.position}'`);
-            plugin.setVariableValues({[`pad-${pad.position}`]: message.newValue});
-        }
-    }
-}
\ No newline at end of file
+		let pad = plugin.currentProject.findPadById(message.pad)
+		if (pad.page === plugin.currentProject.getCurrentPage()) {
+			plugin.log('debug', `Update variable 'pad-${pad.position}'`)
+			plugin.setVariableValues({ [`pad-${pad.position}`]: message.newValue })
+		}
+	}
+}
diff --git a/receive/pad_status_update.js b/receive/pad_status_update.js
index 6a5b03c48d5604efaa233ae0316a32c72bc5ac16..2f788a52735a65732ba34263b50f739ebb7728fd 100644
--- a/receive/pad_status_update.js
+++ b/receive/pad_status_update.js
@@ -1,11 +1,10 @@
-const MessageExecutable = require("./message_executable");
+const MessageExecutable = require('./message_executable')
 
 module.exports = class PadStatusUpdate extends MessageExecutable {
-
-    handleMessage(plugin, message) {
-        plugin.currentProject.updatePadStatus(message.pad, message.status);
-        plugin.checkFeedbacks();
-    }
+	handleMessage(plugin, message) {
+		plugin.currentProject.updatePadStatus(message.pad, message.status)
+		plugin.checkFeedbacks()
+	}
 }
 
-// {"pad":"8b7ef494-d735-45f9-ab84-c95e299298a6","status":"PLAY","updateType":"pad-status-changed"}
\ No newline at end of file
+// {"pad":"8b7ef494-d735-45f9-ab84-c95e299298a6","status":"PLAY","updateType":"pad-status-changed"}
diff --git a/receive/project_update.js b/receive/project_update.js
index 167f60583a4aa5d9afca640ec9f6a9b4ffc958e5..fc5ce533972dd91f90f4224538dd01b2b6493bf6 100644
--- a/receive/project_update.js
+++ b/receive/project_update.js
@@ -1,15 +1,14 @@
-const MessageExecutable = require("./message_executable");
-const Project = require("../project");
+const MessageExecutable = require('./message_executable')
+const Project = require('../project')
 
 module.exports = class ProjectUpdate extends MessageExecutable {
+	handleMessage(plugin, message) {
+		plugin.currentProject = new Project(message)
+		plugin.sendToWebSocket('current-page-request', {})
 
-    handleMessage(plugin, message) {
-        plugin.currentProject = new Project(message)
-        plugin.sendToWebSocket('current-page-request', {});
+		plugin.checkFeedbacks()
 
-        plugin.checkFeedbacks();
-
-        plugin.updateVariables()
-        plugin.updateVariablesForCurrentPage();
-    }
-}
\ No newline at end of file
+		plugin.updateVariables()
+		plugin.updateVariablesForCurrentPage()
+	}
+}