@Override
	public void initialize(URL location, ResourceBundle resources) {

		Optional<String> username = getUserLogin();
		if (username.isPresent() && username.get().length() != 0) {
			user = username.get();
		} else {
			// no login = quit
			System.exit(0);
		}

		sound = Sound.getInstance();

		codeList = FXCollections.observableArrayList();
		output.setItems(codeList);

		// Create a MenuItem and place it in a ContextMenu
		deleteBarcode = new MenuItem("Usuń kod");
		contextMenu = new ContextMenu(deleteBarcode);
		// sets a cell factory on the ListView telling it to use the previously-created ContextMenu
		output.setCellFactory(ContextMenuListCell.<String> forListView(contextMenu));

		deleteBarcode.setOnAction(this);

		input.textProperty().addListener(new ChangeListener<String>() {

			@Override
			public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
				barcode = newValue;

				// schedule new task when barcode starts appearing
				if (newValue.length() == 1) {
					input.setStyle("-fx-background-color: red;");

					// create task and schedule it
					timer = new Timer("rolex");
					task = new BarcodeTimer();
					timer.schedule(task, 2000);
				}
			}
		});

		Platform.runLater(new Runnable() {

			@Override
			public void run() {
				input.requestFocus();
			}
		});

		storage = new Storage(user + "-" + getTimestamp());

		updateStatus();
		appendTooltips();
	}