@Override
    public void start(final Stage primaryStage) throws Exception {
	final Group container = new Group();
	final Scene scene = new Scene(container, Color.TRANSPARENT);
	primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
	    @Override
	    public void handle(final WindowEvent event) {
		System.exit(0);
	    }
	});
	scene.setOnKeyPressed(new EventHandler<KeyEvent>() {

	    @Override
	    public void handle(final KeyEvent event) {
		System.out.println(event);
		if (event.getCode() == KeyCode.F5) {
		    takeSnapshot(scene);
		}
	    }
	});
	primaryStage.setScene(scene);
	primaryStage.setWidth(500);
	primaryStage.setHeight(550);

	final NestNoCss nest = new NestNoCss();
	nest.setPrefSize(400, 400);
	nest.prefWidthProperty().bind(scene.widthProperty());
	nest.prefHeightProperty().bind(scene.heightProperty());
	container.getChildren().add(nest);

	nest.setCurrentTemperature(28);
	nest.setReachTargetTemperatureDelay(25);

	final DoubleBinding reachTargetDoubleBinding = new DoubleBinding() {
	    {
		super.bind(nest.currentTemperatureProperty(),
			nest.targetTemperatureProperty());
	    }

	    @Override
	    protected double computeValue() {
		final double diff = Math.abs(nest.getCurrentTemperature()
			- nest.getTargetTemperature());
		if (diff < 0.5) {
		    return 0;
		}
		if (diff < 1) {
		    return 1;
		}
		if (diff < 2) {
		    return 2;
		} else if (diff < 5) {
		    return 5;
		} else {
		    final int offset = (int) diff / 5;
		    return offset * 5;

		}
	    }
	};

	nest.reachTargetTemperatureDelay().bind(reachTargetDoubleBinding);

	final ScheduledExecutorService scheduledExecutorService = Executors
		.newSingleThreadScheduledExecutor();

	scheduledExecutorService.scheduleAtFixedRate(new Runnable() {

	    double lastTargetTemp = nest.getTargetTemperature();

	    @Override
	    public void run() {
		double newTarget = lastTargetTemp + 25.0 * Math.random();
		newTarget = newTarget % 50;
		final Timeline timeline = new Timeline(
			new KeyFrame(Duration.ZERO,
				new KeyValue(nest.targetTemperatureProperty(), lastTargetTemp),
				new KeyValue(nest.currentTemperatureProperty(), nest.getCurrentTemperature())),
			new KeyFrame(Duration.millis(1600),
				new KeyValue(nest.targetTemperatureProperty(), newTarget),
				new KeyValue(nest.currentTemperatureProperty(), nest.getCurrentTemperature())),
			new KeyFrame(Duration.millis(7000),
				new KeyValue(nest.currentTemperatureProperty(), newTarget),
				new KeyValue(nest.targetTemperatureProperty(), newTarget)));

		timeline.play();

		lastTargetTemp = newTarget;
	    }

	}, 1000, 8000, TimeUnit.MILLISECONDS);

	primaryStage.show();
    }